//
//  CheckResultModel.swift
//  AESOLAR_IOS
//
//  Created by Mac on 2019/8/22.
//  Copyright © 2019 Mr.Wang. All rights reserved.
//

import UIKit
import HandyJSON

struct CheckModel: HandyJSON {
    var id = ""
    var checkMsg = ""
    var result: CheckResultType = .failure
    var barcode = ""
    var code = ""
    var psrInfo = CheckResultModel()
}

enum CheckResultType: String, HandyJSONEnum {
    case success = "1"
    case failure = "2"
    
    var isSuccess: Bool {
        return self == .success
    }
}

struct CheckResultModel: HandyJSON {
    var udid = " "
    var grade = " "
    var barcode = " "
    var address = " "
    var model = " "
    var produceTime = " "
    var echnology = " "
    var provenance = ""
    var edition: CheckResultEditionType = .unknown
}

enum CheckResultEditionType: String, HandyJSONEnum {
    case unknown = ""
    case V1 = "V1"
    case HCB = "HCB"
    case V2 = "V2"
}
